import store from '@/store'

export default function install(Vue) {
  Vue.directive('hasBtn', {
    inserted: (el, binding) => {
      if (store.state.user.userInfo.buttons.indexOf(binding.value) === -1) {
        el.parentNode.removeChild(el)
      }
    } })
}
